//
//  AccessControlTest.swift
//  swift-learningTests
//
//  Created by aron on 2018/5/17.
//  Copyright © 2018年 aron. All rights reserved.
//

import XCTest

class AccessControlTest: XCTestCase {
    
    override func setUp() {
        super.setUp()
        print("============")
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    func testExample() {
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
    }
    
    func testPerformanceExample() {
        // This is an example of a performance test case.
        self.measure {
            // Put the code you want to measure the time of here.
        }
    }
    
    func testFuncAccessControl() {
        print(someFunction())
    }
    
    // Method must be declared fileprivate because its result uses a private type
    fileprivate func someFunction() -> (obj1: SomeInternalClass, obj2: SomePrivateClass) {
        // 函数实现
        return (SomeInternalClass() , SomePrivateClass())
    }
    
}

// 访问权限
// public -> internal -> fileprivate -> private

public class SomePublicClass {}
internal class SomeInternalClass {}
fileprivate class SomeFilePrivateClass {}
private class SomePrivateClass {}

public var somePublicVariable = 0
internal let someInternalConstant = 0
fileprivate func someFilePrivateFunction() {}
private func somePrivateFunction() {}


